#include <stdio.h>
#define _CRT_SECURE_NO_WARNINGS 1

int main() {
	int n = 0;
	printf("enter a odd number:");
	scanf("%d", &n);
	int i = 0;
	for (i = 1; i <= n / 2 + 1; i++) {
		for (int j = 1; j <= n / 2 + 1 - i; j++) {
			printf(" ");
		}
		for (int k = 1; k <= 2 * i - 1; k++) {
			printf("*");
		}
		printf("\n");
	}
	for (i = n / 2; i >= 1; i--) {
		for (int j = 1; j <= n / 2 + 1 - i; j++) {
			printf(" ");
		}
		for (int k = 1; k <= 2 * i - 1; k++) {
			printf("*");
		}
		printf("\n");
	}
	return 0;
}